import { NgModule } from "@angular/core";
import { ModuleWithProviders } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { Login } from "./pages/login/login";
import { Home } from "./pages/home/home";
import { UserPage } from "./pages/user/user/user";
import { RolePage } from "./pages/user/role/role";
import { FunctionPage } from "./pages/user/function/function";
import { PartyPage } from "./pages/user/party/party";
import { PartyModifyPage } from "./pages/user/party/party-modify/party-modify";
import { ElevatorInfoPage } from "./pages/elevator/elevator-info/elevator-info";
import { ElevatotMaintenancePage } from "./pages/elevator/elevator-info/elevator-maintenance/elevator-maintenance";
import { MaintenanceListPage } from "./pages/elevator/maintenance-list/maintenance-list";
import { OnelevatorInfoPage } from "./pages/elevator/onelevator/onelevator-info"; //一梯一档
import { MaintenancePage } from "./pages/elevator/maintenance-record/maintenance-record"; //电梯维修记录页
import { InspectionPage } from "./pages/elevator/inspection-record/inspection-record"; //巡检记录查询（物业）
import { MaintenanceDetailPage } from "./pages/elevator/maintenance-record/maintenance-detail/maintenance-detail"; //电梯维修记录详情页
import { InspectionDetailPage } from "./pages/elevator/inspection-record/inspection-detail/inspection-detail"; //巡检记录查询（物业）详情页
import { InformationPage } from "./pages/user/information/information"; //资讯管理页面
import { InformationAddPage } from "./pages/user/information/information-add/information-add";
import { InformationModifyPage } from "./pages/user/information/information-modify/information-modify";
import { InformationDetailPage } from "./pages/user/information/information-detail/information-detail";
import { ElevatorAppraisalPage } from "./pages/elevator/elevator-appraisal/elevator-appraisal"; // 电梯评价表
import { UsedPartyDetailPage } from "./pages/notice/used-party-detail/used-party-detail";
import { DetailsPage } from "./pages/notice/details/details";
import { NoticePage } from "./pages/notice/notice/notice";
import { MaintenancePartyDetailPage } from "./pages/notice/maintenance-party-detail/maintenance-party-detail";
import { ElevatorRescuePage } from "./pages/elevator/elevator-rescue/elevator-rescue.component";
import { RescueDetailComponent } from "./pages/elevator/elevator-rescue/rescue-detail/rescue-detail.component";
import { ComplaintHis } from "./pages/complaintHis/complaintHis";
import { RescueDrillPage } from "./pages/elevator/rescueDrill/rescueDrill";
import { MainPage } from "./pages/home/main/main";
import { RoleTypePage } from "./pages/user/roleType/role-type";
import { RegisterComponent } from "./pages/register/register.component";
import { Checklist } from "./pages/register-check/register-check-list/register-check-list";
import { ContractPage } from "./pages/contract/contract";
import { Advertisement } from "./pages/Advertisement/advertisement";
import { SafeControlRecord } from "./pages/safe-control-record/safeControlRecord";
import { ElevatorSecureState } from "./pages/elevator/elevator-secure-state/elevator-secure-state";
import { AnnualSummary } from "./pages/elevator/elevator-secure-state/annual-summary/annual-summary";
import { BasicInformation } from "./pages/elevator/elevator-secure-state/basic-information/basic-information";
import { CurrentTimeState } from "./pages/elevator/elevator-secure-state/current-time-state/current-time-state";
import { DutyRankingList } from "./pages/elevator/elevator-secure-state/duty-ranking-list/duty-ranking-list";
import { ElevatorSafeManagementComponent } from "./pages/elevator/elevator-safe-management/elevator-safe-management";
import { MaintenancePlan } from "./pages/maintenancePlan/maintenancePlan";
import { InspectionFtDetailPage } from "./pages/elevator/inspection-record/inspection-ftdetail/inspection-ftdetail";
import { SelfCheckPage } from "./pages/elevator/elevator-self-check/self-check.component";
import { SelfCheckDetailComponent } from "./pages/elevator/elevator-self-check/self-check-detail/self-check-detail.component";
import { MapDemo } from "./pages/home/map-demo/map-demo";
import { PlanDict } from "./pages/supervision/plan/plan-dict/plan-dict";
import { PlanDetail } from "./pages/supervision/plan/plan-detail/plan-detail";
import { SafeControlRecordNew } from "./pages/supervision/safe-control-record/safeControlRecordNew";
import { PublicRandom } from "./pages/supervision/public-random/public-random";
import { PublicRandomSelectPage } from './pages/supervision/public-random/public-random-select/public-random-select';
import { SelfCountPage } from "./pages/home/self-count/self-count";
import { Transferlist } from './pages/transfer-check/transfer-check-list/transfer-check-list';
import { ElevatorUnitFileComponent } from "./pages/elevator/elevator-info/elevator-unit-file/elevator-unit-file.component";
import { BlankPage } from "./pages/blank-page/blank-page";
import {DynamicForm} from "./pages/DynamicForm/dynamic-form";
import {ReportSql} from "./pages/DynamicForm/report-sql/report-sql";
import {TrainingPlan} from "./pages/training/trainingPlan";
import {TrainingPlanDetail} from "./pages/training/trainingPlan-detail/trainingPlan-detail";
import {TrainingPlanResult} from "./pages/training/trainingPlan-result/trainingPlan-result";
import {SpotCheck} from "./pages/maintenancePlan/spot-check/spot-check";
import {SpotObjectDetail} from "./pages/maintenancePlan/spot-object-detail/spot-object-detail";
import {SpotObjectCensus} from "./pages/maintenancePlan/spot-check-census/spot-object-census";
import {SystemInterface} from "./pages/DynamicForm/system-interface/system-interface";
import {PointDefend} from "./pages/point/point-defend";
import {PointFlow} from "./pages/point/point-flow/point-flow";
import {DemandMaintenancePage} from "./pages/demand-maintenance/apply/demandMaintenance";
import {DemandMaintenanceApproval} from "./pages/demand-maintenance/approval/demandMaintenance-approval";
import {DemandMaintenanceElevator} from "./pages/demand-maintenance/apply/elevator/demandMaintenance-elevator";
import {WorkOrder} from "./pages/elevator/elevator-rescue/work-order/work-order";
import {PaperlessMaintApply} from "./pages/paperless-maintenance/apply/paperlessmaint-apply";
import {PaperlessMaintApproval} from "./pages/paperless-maintenance/approval/paperlessMaint-approval";
import {PaperlessMaintElevator} from "./pages/paperless-maintenance/apply/elevator/paperlessMaint-elevator";
import {ContractProjectElevator} from "./pages/contract/contract-project/contract-project-elevator/contract-project-elevator";
import {ContractProjectPage} from "./pages/contract/contract-project/contract-project";
import {NooWnerInfoPage} from "./pages/elevator/elevator-noowner/elevator-noowner";
import {UnconfirmedMaintenance} from "./pages/elevator/unconfirmed-maintenance/unconfirmed-maintenance";
import {NeedconfirmMaintenance} from "./pages/elevator/unconfirmed-maintenance/needconfirm-maintenance/needconfirm-maintenance";


const routes: Routes = [
  { path: "", redirectTo: "/loginSys", pathMatch: "full" },
  { path: "loginSys", component: Login },
  { path: "register", component: RegisterComponent },

  {
    path: "home",
    component: Home,
    children: [
      {
        path: "user",
        component: UserPage
      },
      {
        path: "role",
        component: RolePage
      },
      {
        path: "function",
        component: FunctionPage
      },
      {
        path: "party",
        component: PartyPage
      },
      {
        path: "elevator",
        component: ElevatorInfoPage
      },
      {
        path: "elevator-detail",
        component: ElevatotMaintenancePage
      },
      {
        path: "maintenace-list",
        component: MaintenanceListPage
      },
      {
        path: "onelevator-info",
        component: OnelevatorInfoPage
      },
      {
        path: "register-check-list",
        component: Checklist //临时的审批列表
      },
      {
        path: "maintenance-record",
        component: MaintenancePage
      },
      {
        path: "inspection-record",
        component: InspectionPage
      },
      {
        path: "inspection-ftrecord",
        component: InspectionFtDetailPage
      },
      {
        path: "maintenance-detail",
        component: MaintenanceDetailPage
      },
      {
        path: "inspection-detail",
        component: InspectionDetailPage
      },
      {
        path: "information",
        component: InformationPage
      },

      {
        path: "elevator-appraisal",
        component: ElevatorAppraisalPage
      },
      {
        path: "elevator-rescue",
        component: ElevatorRescuePage
      },
      {
        path: "rescue-detail",
        component: RescueDetailComponent
      },
      {
        path: "notice",
        component: NoticePage
      },
      {
        path: "usedPartyDetail",
        component: UsedPartyDetailPage
      },
      {
        path: "maintenancePartyDetail",
        component: MaintenancePartyDetailPage
      },
      {
        path: "partyDetails",
        component: DetailsPage
      },
      {
        path: "complaintHis",
        component: ComplaintHis
      },
      {
        path: "rescueDrill",
        component: RescueDrillPage
      },
      {
        path: "main",
        component: MainPage
      },
      {
        path: "map-demo",
        component: MapDemo
      },
      {
        path: "roleType",
        component: RoleTypePage
      },
      {
        path: "contract",
        component: ContractPage
      },
      {
        path: "advertisement",
        component: Advertisement
      },
      {
        path: "safeControl",
        component: SafeControlRecord
      },
      {
        path: "elevator-secure-state",
        component: ElevatorSecureState
      },
      {
        path: "elevator-safe-management",
        component: ElevatorSafeManagementComponent
      },
      {
        path: "maintenance-plan",
        component: MaintenancePlan
      },
      {
        path: "self-check",
        component: SelfCheckPage
      },
      {
        path: "self-check-detail",
        component: SelfCheckDetailComponent
      },
      {
        path: "plan-dict",
        component: PlanDict
      },
      {
        path: "plan-detail",
        component: PlanDetail
      },
      {
        path: "safe-control-new",
        component: SafeControlRecordNew
      },
      {
        path: "public-random",
        component: PublicRandom
      },
      {
        path: "public-random-select",
        component: PublicRandomSelectPage
      },
      {
        path: "self-count",
        component: SelfCountPage
      },
      {
        path: "transfer-check-list",
        component: Transferlist //审批列表
      },
      {
        path: "elevator-unit-file",
        component: ElevatorUnitFileComponent
      },
      {
        path: "blank-page",
        component: BlankPage
      },{
        path:"dynamicForm",
        component: DynamicForm
      },{
        path:"report-sql",
        component: ReportSql
      },{
        path:"spot-check",
        component: SpotCheck
      },{
        path:"spot-check-detail",
        component: SpotObjectDetail
      },
      {
        path: "training-plan",
        component: TrainingPlan
      },
      {
        path: "training-plan-detail",
        component: TrainingPlanDetail
      },
      {
        path: "training-result",
        component: TrainingPlanResult
      },{
        path: "census",
        component: SpotObjectCensus
      },{
        path: "systemInterface",
        component: SystemInterface
      },{
        path: "pointsDefend",
        component: PointDefend
      },{
        path: "pointflow",
        component: PointFlow
      },{
        path : "demandMaintenancePage",
        component : DemandMaintenancePage
      },
      {
        path: "paperlessMaintApply",
        component: PaperlessMaintApply
      },
      {
        path : "paperlessMaintApproval",
        component : PaperlessMaintApproval
      },
      {
        path : 'paperlessMaintElevator',
        component : PaperlessMaintElevator
      },
      {
        path : "demandMaintenanceApproval",
        component : DemandMaintenanceApproval
      },{
        path : "demandMaintenanceElevator",
        component : DemandMaintenanceElevator
      },{
        path : "emergency-rescue",
        component : WorkOrder
      },
      {
        path : "contractProjectElevator",
        component : ContractProjectElevator
      },{
        path : "contractProjectPage",
        component : ContractProjectPage
      },{
        path: "noowner",
        component: NooWnerInfoPage
      },{
        path: "unconfirmedMaintenance",
        component: UnconfirmedMaintenance
      },{
        path: "needconfirmdMaintenance",
        component: NeedconfirmMaintenance
      }

    ]
  },
  { path: "**", component: Login }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
